package work.mediway.mdm.core.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;

import cn.hutool.core.util.StrUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Setter;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2021/1/12
 */
@ApiModel
public class BaseVO {

    @TableField(exist = false)
    @ApiModelProperty(value = "编号")
    @Setter
    private String rowId;

    public String getRowId() {
        if (StrUtil.isBlank(rowId)){
            return IdWorker.getIdStr();
        }
        return rowId;
    }
}
